import c from '@/../config/config.json';
// 默认运行时配置
import { getUrlParams } from '@/utils/utils';
let rbacToken = "";
(function () {
  rbacToken =  
  window.location.href.indexOf('rbacToken') > 0 ?
   getUrlParams('rbacToken')
   : c.RBACTOKEN
})()
export class G {
  /**
   * 高德地图的key
   */
  public static amapkey: string = process.env.AMAP_KEY || '';
  /**
   * 全局地图中心点
   */
  public static mapCenter: any = c.ROOT_MAP_CENTER;
  /**
   * 请求地址根目录,会根据环境配置
   */
  public static rootUrl: string = process.env.UMI_ENV === 'development' ? c.DEV_URL : c.BUILD_URL;
  /**
   * 调试环境token
   */
  public static rbacToken: string = rbacToken;
  /**
   * 登录跟登出导向的地址
   */
  public static loginUrl: string = c.LOGIN_URL;
}

// 初始化记载数据层面也在此
